/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-04-14
 * Time: 23:15
 */
public class Demo3 {
    public static int count;
    public static void main(String[] args) throws InterruptedException {
        Thread t1=new Thread(new Runnable() {
            @Override
            public void run() {
                int result=0;
                for (int i = 0; i <=1000; i++) {
                  result+=i;
                }
                count=result;
            }
        });
        t1.start();
        t1.join();
        System.out.println("count="+count);

    }
}
